nlp_architect.common.high_level_doc.HighLevelDoc

class nlp_architect.common.high_level_doc.HighLevelDoc[source]

object for annotation documents

Parameters:
  • self.doc_text (str) – document text
  • self.annotation_set (list(str)) – list of all annotations in doc
  • self.spans (list(dict)) – list of span dict, each span_dict is structured as follows: { ‘end’: (int), ‘start’: (int), ‘type’: (str) string of annotation }
__init__()[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__() Initialize self.
displacy_doc() Return doc adapted to displacyENT expected input
json() Return json representations of the object
pretty_json() Return pretty json representations of the object
displacy_doc()[source]

Return doc adapted to displacyENT expected input

json()[source]

Return json representations of the object

Returns:json representations of the object
Return type:json
pretty_json()[source]

Return pretty json representations of the object

Returns:pretty json representations of the object
Return type:json